﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using DAL;
using Entity.Table;

namespace BLL.Db
{
    public class PaymentManager
    {
        /// <summary>
        /// 判断是否可以交费
        /// </summary>
        /// <param name="gasUserID"></param>
        /// <returns></returns>
        public static bool IsPayment(string gasUserID,string bankWaterID)
        {
            return PaymentDatabase.IsPayment(gasUserID,bankWaterID);
        }

        /// <summary>
        /// 判断缴费前后的滞纳金是否一致
        /// </summary>
        /// <param name="gasUserID"></param>
        /// <param name="znj"></param>
        /// <returns></returns>
        public static bool IsEqualZNJ(string gasUserID, double znj)
        {
            return PaymentDatabase.IsEqualZNJ(gasUserID, znj);
        }

        /// <summary>
        /// 添加一条银行流水信息
        /// </summary>
        /// <param name="bw">银行流水实体</param>
        /// <returns></returns>
        public static bool Insert(MPayment bw)
        {
            return PaymentDatabase.Insert(bw);
        }
       
        /// <summary>
        /// 更新扣款标志为未扣款状态
        /// </summary>
        /// <param name="gasUserID"></param>
        /// <returns></returns>
        public static bool UpdateFlag(string gasUserID)
        {
            return PaymentDatabase.UpdateFlag(gasUserID);
        }
    }
}
